package ink.yql.model;

import java.io.Serializable;

/**
 * @author YQL
 * 账号类
 */
public class Accountnumber implements Serializable {
    /**
     *  账号id
     */
    private Integer anid;
    /**
     * 用户id
     */
    private Integer uid;
    /**
     * 银行卡号
     */
    private String anaccountNumber;
    /**
     *  是否默认
     */
    private Integer andefault;

    public Accountnumber(Integer anid, Integer uid, String anaccountNumber, Integer andefault) {
        this.anid = anid;
        this.uid = uid;
        this.anaccountNumber = anaccountNumber;
        this.andefault = andefault;
    }

    public Accountnumber() {
    }

    public static AccountnumberBuilder builder() {
        return new AccountnumberBuilder();
    }

    public Integer getAnid() {
        return this.anid;
    }

    public Integer getUid() {
        return this.uid;
    }

    public String getAnaccountNumber() {
        return this.anaccountNumber;
    }

    public Integer getAndefault() {
        return this.andefault;
    }

    public void setAnid(Integer anid) {
        this.anid = anid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public void setAnaccountNumber(String anaccountNumber) {
        this.anaccountNumber = anaccountNumber;
    }

    public void setAndefault(Integer andefault) {
        this.andefault = andefault;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof Accountnumber)) return false;
        final Accountnumber other = (Accountnumber) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$anid = this.getAnid();
        final Object other$anid = other.getAnid();
        if (this$anid == null ? other$anid != null : !this$anid.equals(other$anid)) return false;
        final Object this$uid = this.getUid();
        final Object other$uid = other.getUid();
        if (this$uid == null ? other$uid != null : !this$uid.equals(other$uid)) return false;
        final Object this$anaccountNumber = this.getAnaccountNumber();
        final Object other$anaccountNumber = other.getAnaccountNumber();
        if (this$anaccountNumber == null ? other$anaccountNumber != null : !this$anaccountNumber.equals(other$anaccountNumber))
            return false;
        final Object this$andefault = this.getAndefault();
        final Object other$andefault = other.getAndefault();
        if (this$andefault == null ? other$andefault != null : !this$andefault.equals(other$andefault)) return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof Accountnumber;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $anid = this.getAnid();
        result = result * PRIME + ($anid == null ? 43 : $anid.hashCode());
        final Object $uid = this.getUid();
        result = result * PRIME + ($uid == null ? 43 : $uid.hashCode());
        final Object $anaccountNumber = this.getAnaccountNumber();
        result = result * PRIME + ($anaccountNumber == null ? 43 : $anaccountNumber.hashCode());
        final Object $andefault = this.getAndefault();
        result = result * PRIME + ($andefault == null ? 43 : $andefault.hashCode());
        return result;
    }

    public String toString() {
        return "Accountnumber(anid=" + this.getAnid() + ", uid=" + this.getUid() + ", anaccountNumber=" + this.getAnaccountNumber() + ", andefault=" + this.getAndefault() + ")";
    }

    public static class AccountnumberBuilder {
        private Integer anid;
        private Integer uid;
        private String anaccountNumber;
        private Integer andefault;

        AccountnumberBuilder() {
        }

        public Accountnumber.AccountnumberBuilder anid(Integer anid) {
            this.anid = anid;
            return this;
        }

        public Accountnumber.AccountnumberBuilder uid(Integer uid) {
            this.uid = uid;
            return this;
        }

        public Accountnumber.AccountnumberBuilder anaccountNumber(String anaccountNumber) {
            this.anaccountNumber = anaccountNumber;
            return this;
        }

        public Accountnumber.AccountnumberBuilder andefault(Integer andefault) {
            this.andefault = andefault;
            return this;
        }

        public Accountnumber build() {
            return new Accountnumber(anid, uid, anaccountNumber, andefault);
        }

        public String toString() {
            return "Accountnumber.AccountnumberBuilder(anid=" + this.anid + ", uid=" + this.uid + ", anaccountNumber=" + this.anaccountNumber + ", andefault=" + this.andefault + ")";
        }
    }
}
